<div class="row">
  <div class="span6"> 
<form action="/<*$controller*>/vipsetsave" method="post" id="form1" enctype="multipart/form-data" >    
        <table class="table table-bordered " style="margin-top:15px;">
            <tr>
                <td rowspan="2">VIP</td>
                <td colspan="2">普通用户</td>
                <td colspan="2">试用vip</td>
                <td colspan="2">付费vip</td>
            </tr>
            <tr>
                <td>可见</td>
                <td>可用</td>
                <td>可见</td>
                <td>可用</td>
                <td>可见</td>
                <td>可用</td>
            </tr>
        	<*foreach from=$result item=item key=key*>
            <tr>
            	<td><*$item.name*></td>
                <*foreach from=$res item=a key=k*>
                <*if $a.itemid eq $item.itemid*>
                
                <*if $a.viptype eq 0*>
                <td>
                	<input type="checkbox" id="see" name="see[<*$a.itemid*>][<*$a.viptype*>]" value="<*$item.itemid*>" <*if $a.canlook eq 1*> checked="checked"<*/if*>>
                </td>
                <td>
                    <input type="checkbox" id="use" name="use[<*$a.itemid*>][<*$a.viptype*>]" value="<*$item.itemid*>" <*if $a.canuse eq 1*> checked="checked"<*/if*>>
                </td>
                <*/if*>
				
                <*if $a.viptype eq 1*>
                <td>
                	<input type="checkbox" id="see" name="see[<*$a.itemid*>][<*$a.viptype*>]" value="<*$item.itemid*>" <*if $a.canlook eq 1*> checked="checked"<*/if*>>
                </td>
                <td>
                    <input type="checkbox" id="use" name="use[<*$a.itemid*>][<*$a.viptype*>]" value="<*$item.itemid*>" <*if $a.canuse eq 1*> checked="checked"<*/if*>>
                </td>
                <*/if*>
				
                <*if $a.viptype eq 2*>
                <td>
                	<input type="checkbox" id="see" name="see[<*$a.itemid*>][<*$a.viptype*>]" value="<*$item.itemid*>" <*if $a.canlook eq 1*> checked="checked"<*/if*>>
                </td>
                <td>
                    <input type="checkbox" id="use" name="use[<*$a.itemid*>][<*$a.viptype*>]" value="<*$item.itemid*>" <*if $a.canuse eq 1*> checked="checked"<*/if*>>
                </td>
                <*/if*>

				<*/if*>
                <*/foreach*>
				<input type="hidden" name="itemid[]" value="<*$item.itemid*>" id=""/>
            </tr>
            <*/foreach*>
        	<tr><td colspan="7" style="text-align:center;">
                <button type="submit" class="btn btn-primary" >保存修改</button>
                <button type="button" class="btn" onclick="window.location='/<*$controller*>/<*$action*>'">取消</button>
                </td>
            </tr>
        </table>
</form>
  </div>
</div>
<script type="text/javascript">
  function deleteit(id)
{
  if(confirm("确定要删除吗？")){
   window.location='/<*$controller*>/vipdelete/id/'+id;
  }
} 

</script> 
